/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package ms.jasim.model.event;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import ms.jasim.model.ModelPackage;

import org.eclipse.emf.common.util.Enumerator;

/**
 * <!-- begin-user-doc -->
 * A representation of the literals of the enumeration '<em><b>Modification Type</b></em>',
 * and utility methods for working with them.
 * <!-- end-user-doc -->
 * @see ms.jasim.model.event.EventPackage#getModificationType()
 * @model
 * @generated
 */
public enum ModificationType implements Enumerator {
	/**
	 * The '<em><b>ADD FACT</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #ADD_FACT_VALUE
	 * @generated
	 * @ordered
	 */
	ADD_FACT(0, "ADD_FACT", "Add fact"),

	/**
	 * The '<em><b>REMOVE FACT</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #REMOVE_FACT_VALUE
	 * @generated
	 * @ordered
	 */
	REMOVE_FACT(1, "REMOVE_FACT", "Remove fact"),

	/**
	 * The '<em><b>ADD GOAL</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #ADD_GOAL_VALUE
	 * @generated
	 * @ordered
	 */
	ADD_GOAL(2, "ADD_GOAL", "Add PDDL goal"),

	/**
	 * The '<em><b>REMOVE GOAL</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #REMOVE_GOAL_VALUE
	 * @generated
	 * @ordered
	 */
	REMOVE_GOAL(3, "REMOVE_GOAL", "Remove PDDL goal");

	/**
	 * The '<em><b>ADD FACT</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>ADD FACT</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #ADD_FACT
	 * @model literal="Add fact"
	 * @generated
	 * @ordered
	 */
	public static final int ADD_FACT_VALUE = 0;

	/**
	 * The '<em><b>REMOVE FACT</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>REMOVE FACT</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #REMOVE_FACT
	 * @model literal="Remove fact"
	 * @generated
	 * @ordered
	 */
	public static final int REMOVE_FACT_VALUE = 1;

	/**
	 * The '<em><b>ADD GOAL</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>ADD GOAL</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #ADD_GOAL
	 * @model literal="Add PDDL goal"
	 * @generated
	 * @ordered
	 */
	public static final int ADD_GOAL_VALUE = 2;

	/**
	 * The '<em><b>REMOVE GOAL</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>REMOVE GOAL</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #REMOVE_GOAL
	 * @model literal="Remove PDDL goal"
	 * @generated
	 * @ordered
	 */
	public static final int REMOVE_GOAL_VALUE = 3;

	/**
	 * An array of all the '<em><b>Modification Type</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static final ModificationType[] VALUES_ARRAY =
		new ModificationType[] {
			ADD_FACT,
			REMOVE_FACT,
			ADD_GOAL,
			REMOVE_GOAL,
		};

	/**
	 * A public read-only list of all the '<em><b>Modification Type</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final List<ModificationType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));

	/**
	 * Returns the '<em><b>Modification Type</b></em>' literal with the specified literal value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static ModificationType get(String literal) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			ModificationType result = VALUES_ARRAY[i];
			if (result.toString().equals(literal)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Modification Type</b></em>' literal with the specified name.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static ModificationType getByName(String name) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			ModificationType result = VALUES_ARRAY[i];
			if (result.getName().equals(name)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Modification Type</b></em>' literal with the specified integer value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static ModificationType get(int value) {
		switch (value) {
			case ADD_FACT_VALUE: return ADD_FACT;
			case REMOVE_FACT_VALUE: return REMOVE_FACT;
			case ADD_GOAL_VALUE: return ADD_GOAL;
			case REMOVE_GOAL_VALUE: return REMOVE_GOAL;
		}
		return null;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final int value;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String name;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String literal;

	/**
	 * Only this class can construct instances.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private ModificationType(int value, String name, String literal) {
		this.value = value;
		this.name = name;
		this.literal = literal;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getValue() {
	  return value;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getName() {
	  return name;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getLiteral() {
	  return literal;
	}

	/**
	 * Returns the literal value of the enumerator, which is its string representation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		return literal;
	}
	
} //ModificationType
